<template>
  <div>
    <Swipe :height="height" autoplay="3000">
      <SwipeItem v-for="(item, index) in imges" :key="index">
        <img :src="item.picUrl" class="imgs" :style="width" alt="" />
      </SwipeItem>
    </Swipe>
  </div>
</template>

<script>
import Vue from "vue";
import { Swipe, SwipeItem } from "vant";
import 'vant/lib/index.css';
Vue.use(Swipe);
Vue.use(SwipeItem);
export default {
      components: {
    Swipe,
    SwipeItem,
  },
    props:{
        imges:{
            type:Array,
            required:true,
        },
        height:{
            type:Number|String,
            default:"8rem"
        }
    },
    computed: {
        width:function(){
            return{
                width:"100%",
                height:"8rem"
            }
        }
    },
};
</script>

<style >
.imgs{
    width: 100%;
    height: 100%;
}
</style>